package org.xxpay.core.service;


import org.xxpay.core.entity.PayAlizftMchInfo;

import java.util.List;
import java.util.Map;

/**
 * @author: pangxiaoyu
 * @date: 20/07/27
 * @description:
 */
public interface IPayAlizftMchInfoService {

    List<PayAlizftMchInfo> select(int pageIndex, int pageSize, PayAlizftMchInfo payAlizftMchInfo);

    long count(PayAlizftMchInfo payAlizftMchInfo);

    int add(PayAlizftMchInfo payAlizftMchInfo);

    int update(PayAlizftMchInfo payAlizftMchInfo);

    int delete(Long id);

    PayAlizftMchInfo findById(Long id);

    /** 根据条件更新 **/
    int updateByCondition(PayAlizftMchInfo updateRecord, PayAlizftMchInfo condition, List<Byte> applyStatusList);

    PayAlizftMchInfo selectBaseInfoById(Long subMchId);

    PayAlizftMchInfo selectBaseInfoByPPAIdAndSmId(Integer ppaId, String smid);

    /** 查找可用smid **/
    String getOneAvailableSmid(Long passageTemplateId,Long amount,
                               Long qRPaySupport, Long appPaySupport,
                               Long wapPaySupport, Long pcPaySupport
    );

    int updateDayAmount(String smid, Integer ppaId, Long amount);

    List<Map> subData(int offset, int limit, Long passageTemplateId, String smid, String createTimeStartStr, String createTimeEndStr);

    Long subDataCount(String smid, Long passageTemplateId, String createTimeStartStr, String createTimeEndStr);
}
